/**
*资源管理
*/
import request from '@/utils/request'
// 列表
export function fetchList(query) {
  return request({
    url: '/admin/article/search',
    method: 'post',
    data: query
  })
}
// 添加
export function add(params) {
  return request({
    url: '/admin/article/add',
    method: 'post',
    data: params
  })
}
// 获取当前行信息
export function rows(ids) {
  return request({
    url: '/admin/article/detail',
    method: 'get',
    params: {
      id: ids
    }
  })
}
// 编辑
export function edit(id, isshow, ac_id, title, istop, ishot, sort, image, content, keywords, description) {
  return request({
    url: '/admin/article/edit',
    method: 'post',
    data: {
      id,
      isshow,
      ac_id,
      title,
      istop,
      ishot,
      sort,
      image,
      content,
      keywords,
      description
    }
  })
}

// 删除
export function del(ids) {
  return request({
    url: '/admin/article/del',
    method: 'post',
    data: {
      ids
    }
  })
}
